<?php

/**
 * Created by PhpStorm.
 * User: THINK
 * Date: 2017/8/31
 * Time: 16:45
 */
namespace Admin\Model;
use Think\Model\RelationModel;
class UserModel extends RelationModel
{
    protected $_link = array(
        'role'=>array(
            'mapping_type'      =>  self::MANY_TO_MANY,
            'foreign_key'       =>  'user_id',
            'relation_foreign_key'  =>  'role_id',
            'relation_table'    =>  'xyh_role_user'
        ),
        );
}